package com.yjzx.util.common.util.exception;

import java.util.Objects;

/**
 * @author guozhi
 * @date 2024/9/6
 * @description BiFunctionThrow
 */
@FunctionalInterface
public interface BiFunctionThrow<T, U, R, E extends Throwable> {
    R apply(T t, U u) throws E;

    default <V> BiFunctionThrow<T, U, V, E> andThen(FunctionThrow<? super R, ? extends V, E> after) {
        Objects.requireNonNull(after);
        return (T t, U u) -> after.apply(apply(t, u));
    }
}
